<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="utf-8" />
		<title>保护区巡护管理系统</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />

		<!-- basic styles -->

		<link href="../../resources/assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../../resources/assets/css/font-awesome.min.css" />

		<!--[if IE 7]>
		  <link rel="stylesheet" href="../../resources/assets/css/font-awesome-ie7.min.css" />
		<![endif]-->

		<!-- page specific plugin styles -->

		<!-- fonts -->

		<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" />

		<!-- ace styles -->

		<link rel="stylesheet" href="../../resources/assets/css/ace.min.css" />
		<link rel="stylesheet" href="../../resources/assets/css/ace-rtl.min.css" />
<!-- basic styles -->

		<link href="../../resources/assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../../resources/assets/css/font-awesome.min.css" />

		<!--[if IE 7]>
		  <link rel="stylesheet" href="../../resources/assets/css/font-awesome-ie7.min.css" />
		<![endif]-->

		<!-- page specific plugin styles -->

		<link rel="stylesheet" href="../../resources/assets/css/jquery-ui-1.10.3.custom.min.css" />
		<link rel="stylesheet" href="../../resources/assets/css/jquery.gritter.css" />

		<!-- fonts -->

		<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" />

		<!-- ace styles -->

		<link rel="stylesheet" href="../../resources/assets/css/ace.min.css" />
		<link rel="stylesheet" href="../../resources/assets/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="../../resources/assets/css/ace-skins.min.css" />

		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="../../resources/assets/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<style>
			.spinner-preview {
				width:100px;
				height:100px;
				text-align:center;
				margin-top:60px;
			}
			
			.dropdown-preview {
				margin:0 5px;
				display:inline-block;
			}
			.dropdown-preview  > .dropdown-menu {
				display: block;
				position: static;
				margin-bottom: 5px;
			}
		</style>

		<!-- ace settings handler -->

		<script src="../../resources/assets/js/ace-extra.min.js"></script>
		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="../../resources/assets/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

		<!--[if lt IE 9]>
		<script src="../../resources/assets/js/html5shiv.js"></script>
		<script src="../../resources/assets/js/respond.min.js"></script>
		<![endif]-->
	</head>

	<body class="login-layout">
		<div class="main-container">
			<div class="main-content">
				<div class="row">
					<div class="col-sm-10 col-sm-offset-1" style="width: 380px;height: 410px;position:absolute; left:50%; top:50%; margin:-205px 0 0 -190px;">
						<div class="login-container">
							<div class="center">
								<h1>
									<img src="../../resources/assets/images/logo.png">
								</h1>
							</div>

							<div class="space-6"></div>

							<div class="position-relative">
								<div id="login-box" class="login-box visible widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
											<h4 class="header blue lighter bigger">
												<i class="icon-coffee green"></i>
												请输入您的信息
											</h4>

											<div class="space-6"></div>

											<form>
												<fieldset>
													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="text" id="username" class="form-control" placeholder="用户名" />
															<i class="icon-user"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password" id="password" class="form-control" placeholder="密码" />
															<i class="icon-lock"></i>
														</span>
													</label>

													<div class="space"></div>

													<div class="clearfix">
														<label class="inline">
															<input type="checkbox" class="ace" id="rememberMe"/>
															<span class="lbl"> 记住用户名密码</span>
														</label>

														<button type="button" onclick="login()" class="width-35 pull-right btn btn-sm btn-primary">
															<i class="icon-key"></i>
															登录
														</button>
													</div>

													<div class="space-4"></div>
												</fieldset>
											</form>

										</div><!-- /widget-main -->

									</div><!-- /widget-body -->
								</div><!-- /login-box -->
							</div><!-- /position-relative -->
						</div>
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div>
		</div><!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->

		<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>

		<!-- <![endif]-->

		<!--[if IE]>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<![endif]-->

		<!--[if !IE]> -->

		<script type="text/javascript">
			window.jQuery || document.write("<script src='../../resources/assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='../../resources/assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
</script>
<![endif]-->

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='../../resources/assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="../../resources/assets/js/bootstrap.min.js"></script>
		<script src="../../resources/assets/js/typeahead-bs2.min.js"></script>

		<!-- page specific plugin scripts -->

		<!--[if lte IE 8]>
		  <script src="../../resources/assets/js/excanvas.min.js"></script>
		<![endif]-->

		<script src="../../resources/assets/js/jquery-ui-1.10.3.custom.min.js"></script>
		<script src="../../resources/assets/js/jquery.ui.touch-punch.min.js"></script>
		<script src="../../resources/assets/js/bootbox.min.js"></script>
		<script src="../../resources/assets/js/jquery.easy-pie-chart.min.js"></script>
		<script src="../../resources/assets/js/jquery.gritter.min.js"></script>
		<script src="../../resources/assets/js/jquery.cookie.js"></script>

		<!-- ace scripts -->

		<script src="../../resources/assets/js/ace-elements.min.js"></script>
		<script src="../../resources/assets/js/ace.min.js"></script>
		<!-- inline scripts related to this page -->

		<script type="text/javascript">
			function show_box(id) {
			 jQuery('.widget-box.visible').removeClass('visible');
			 jQuery('#'+id).addClass('visible');
			}
			
			//////login
			function login(){
				 var username = $("#username").val();
				 var password = $("#password").val();
				 //alert(username+password);
				 if(trim(username) == ""){
				 	$.gritter.add({
						title: '提示',
						text: '用户名不能为空！',
						class_name: 'gritter-error' 
					});
				 	$("#username").focus();
				 }else if(trim(password) == ""){
				 	$.gritter.add({
						title: '提示',
						text: '密码不能为空！',
						class_name: 'gritter-error' 
					});
				 	$("#password").focus();
				 }else{
				 	alert(username+password);
				 }
				 if($('#rememberMe')[0].checked){
			            var str_username = $("#username").val();  
			            var str_password = $("#password").val();  
			            $.cookie("rmbUser", "true", { expires: 7 }); //存储一个带7天期限的cookie  
			            $.cookie("username", str_username, { expires: 7 });  
			            $.cookie("password", str_password, { expires: 7 });  
			        }else {  
			            $.cookie("rmbUser", "false", { expire: -1 });  
			            $.cookie("username", "", { expires: -1 });  
			            $.cookie("password", "", { expires: -1 });  
			        }  
			}
			////记住用户名
			$(function(){
				if ($.cookie("rmbUser") == "true") {  
			       // $('#rememberMe')[0].checked;  
			        $("#username").val($.cookie("username"));  
			        $("#password").val($.cookie("password"));  
			       }  
				
			});
			/////
			function trim(str) {
		         return str.replace(/(^\s*)|(\s*$)/g, "");
		     }
		</script>
	<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
</body>
</html>
